package com.bjxst;

import java.io.Serializable;

/**将对象序列化到文件
 * ObjectOutputStream 可以将一个内存中的Java对象通过序列的方式写入到磁盘的文
 * 件中。被序列化的对象必须要实现Serializable 序列化接口，否则会抛出异常*/
//实现Serializable
//一个接口没有任何抽象方法，那么这个是典型的标识接口
    /*创建实体类*/
public class Users implements Serializable {
    private int userid;
    private String username;
    private String userage;

    public Users() {
    }

    public Users(int userid, String username, String userage) {
        this.userid = userid;
        this.username = username;
        this.userage = userage;
    }

    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUserage() {
        return userage;
    }

    public void setUserage(String userage) {
        this.userage = userage;
    }
}
